package com.cn.zy.ex;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author: zhangyi
 * @date: 2018/12/14 10:01
 * @description:
 */
public class ScanerStringIC {
    public static void main(String[] args) {
        while(true){
            Scanner scanner = new Scanner(System.in);
            String str = scanner.nextLine();
            if(str.equals("exit")){
                break;
            }
            char[] chars = str.toCharArray();
            for(int i = 0; i < chars.length/2; i++){
                char temp = chars[chars.length - i-1];
                chars[chars.length - i-1] = chars[i];
                chars[i] = temp;
            }
            Arrays.asList(chars).stream().forEach(c -> System.out.println(c));
        }
    }
}
